function create_updated_collection(collection_a, object_b) {
  let obj={};
  let arr=[];
  for(let item of collection_a){
   if(! obj[item]){
        obj[item]={};
        obj[item].key=item;
        obj[item].count=1;
       }else{
         obj[item].count++
    }
  }
  for( let key in obj){
      arr.push(obj[key]);
  }
  for(let i of  arr ){
    for(let item of object_b.value)
  if(i.key==item){
      i.count= i.count-parseInt(i.count/3);
   }
 }
 return arr;
 console.log(arr); //在这里写入代码
}

module.exports = create_updated_collection;
